package com.seelyn.ddvideo.utils;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author ifcousing-linfeng
 * @since 2017/6/21
 */
public class DownloadQueue {

    private static LinkedBlockingQueue<UrlInfo> queues = null;

    static LinkedBlockingQueue<UrlInfo> getDownQueue() {
        if (queues == null) {
            queues = new LinkedBlockingQueue<UrlInfo>();
        }
        return queues;
    }

    public static void add(UrlInfo obj) {
        if (queues == null)
            queues = getDownQueue();
        queues.offer(obj);
    }

}
